This invention related to computer systems, and more particularly to disk access in databases.
Over the last decade the computer industry has witnessed dramatic improvements in CPU speeds, memory sizes, and storage capacities. However, disk access times have improved at a slower rate with respect to these components. In certain applications, this slower improvement of disk access time efficiency causes bottlenecks. That is, many applications spend time waiting for disk access and thus do not realize the improvements in the other components. Recent technologies (such as RAIDS and storage area networks) offer much greater overall storage bandwidth as well as concurrent disk accesses, however, they still neglect the performance of a single disk access. The technology behind a single disk access (i.e., rotation and seek) has stayed the same over the years.
Databases consist of data files that contain data in the form of relational database objects. Example database objects include tables, clusters, partitions, and Large Objects (LOBs). At the physical level these objects are a group of fixed sized data blocks. Data blocks are assigned a physical address in the disk and do not move. Thus updates are performed to the block whenever the data contained in the block changes. In applications where numerous changes take place, the system experiences an increase in disk access, each access involving a rotation and seek for each data block. Existing solutions include buffer caching and incremental check pointing which include storing all the updates since the last disk write in a buffer, and flushing them to disk at a later time. However, these solutions simply delay the same number of physical writes to disk and do not change the concept of a single disk access per data block. A solution is needed that reduces or eliminates the disk access bottleneck described above while still fitting into a classical database framework including transaction management, recovery management, and database query ability.
In one embodiment a method of writing to a disk includes receiving a plurality of updates to an object, identifying an area of contiguous free space in the object, placing the plurality of updates in the area of contiguous free space in the object, and updating the disk with the plurality of contiguous updates in one disk access.
In another embodiment, a method of writing to disk may include receiving an update to a data block of an object, appending the updated data block to the end of an object memory, repeating the appending until there are a plurality of contiguous updates at the end of the object memory, and updating the disk with the plurality of contiguous updates in one disk access.